package newPan3d.content.tree.luoye
{
	import _Pan3D.program.Program3DManager;
	
	import _me.Scene_data;
	
	import flash.display3D.Context3D;
	import flash.display3D.Program3D;
	
	import test.zhuwei.TreeDisplay3DContainer;

	public class LuoYeLevel
	{
		private var _context3D:Context3D;
		private var _groundItem:Array;
		private var _bulidSpriteItem:Array;
		private var _display3DContainer:TreeDisplay3DContainer
		private var _zhuanQuanDispay3DSprite:LuoYeDisplay3DSprite;
		public function LuoYeLevel()
		{
			_display3DContainer=new TreeDisplay3DContainer();
			_context3D=Scene_data.context3D;
			addLuoye();
		}
		
		private function addLuoye():void
		{
		
			_zhuanQuanDispay3DSprite =new LuoYeDisplay3DSprite(_context3D);
			_zhuanQuanDispay3DSprite.url ="box512";
			_zhuanQuanDispay3DSprite.x=500
			_zhuanQuanDispay3DSprite.y=100;
			_zhuanQuanDispay3DSprite.z=500
			_zhuanQuanDispay3DSprite.scale=0.2;
			_display3DContainer.addChild(_zhuanQuanDispay3DSprite);
			var treeShaderProgram3d:Program3D = Program3DManager.getInstance().getProgram( LuoYeShader.LUO_YE_SHADER);
			_display3DContainer.setProgram3D(treeShaderProgram3d);
			_zhuanQuanDispay3DSprite.program3D=treeShaderProgram3d;
	
			
		}
		public function upData():void
		{
			//_zhuanQuanDispay3DSprite.x=Scene_data.focus3D.x
			//_zhuanQuanDispay3DSprite.z=Scene_data.focus3D.z+500

			_display3DContainer.update();
	
		}
	}
}